<template>
  <div>
    <el-container>
      <el-aside width="auto">
        <common-aside/>
      </el-aside>

      <el-container :style="{marginLeft: !this.isCollapse ? 220 + 'px': 64 + 'px'}">
        <el-header>
          <common-header/>
        </el-header>
        <common-tag/>
        <el-main style="min-height: calc(100vh - 90px);">
          <!-- 路由出口 -->
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import CommonAside from './CommonAside.vue'
import CommonHeader from './CommonHeader.vue';
import CommonTag from './CommonTag.vue';

export default {
  name: 'Main',
  data() {
    return {}
  },
  // 注册组件
  components: {
    CommonAside,
    CommonHeader,
    CommonTag
  },
  computed: {
    isCollapse() {
      return this.$store.state.tab.isCollapse;
    }
  }
}
</script>
<style lang="less" scoped>
.el-header {
  padding: 0;
}

.el-menu {
  border-right: none;
}
.el-main {
  background: #f0f2f5;
}
</style>